from django.core.management.base import BaseCommand
from spideradmin.models import DramaM3u8Link
from seleniumwire import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
import time

class Command(BaseCommand):
    help = '爬取剧集m3u8链接'

    def handle(self, *args, **options):
        # 复制原 spider.py 的爬虫主逻辑到这里
        # 用 DramaM3u8Link.objects.create(...) 存库
        self.stdout.write(self.style.SUCCESS('爬取完成'))
